package cn.tk.service.mr.impl;

import cn.tk.model.entity.mr.Flow;
import cn.tk.model.entity.mr.FlowEdge;
import cn.tk.model.entity.mr.FlowNode;
import cn.tk.repository.mr.FlowDao;
import cn.tk.repository.mr.FlowEdgeDao;
import cn.tk.repository.mr.FlowNodeDao;
import cn.tk.service.mr.FlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by denglw on 2021/8/2.<br/>
 * Desc: 流程  服务实现层
 */
@Service("mrFlowService")
public class FlowServiceImpl implements FlowService {

    @Autowired
    private FlowDao flowDao;

    @Autowired
    private FlowNodeDao flowNodeDao;

    @Autowired
    private FlowEdgeDao flowEdgeDao;

    @Override
    public List<Flow> getAllFlows() {
        return flowDao.findAll();
    }

    @Override
    public List<FlowNode> getAllNodes() {
        return flowNodeDao.findAll();
    }

    @Override
    public List<FlowEdge> getAllEdges() {
        return flowEdgeDao.findAll();
    }
}
